package 设计模式.StrategyModel;

public class StrategyTest {
    public static void main(String[] args) {
        Context context = new Context(new Add());
        System.out.println("7 + 8 = " + context.execStrategy(7, 8));

        context = new Context(new Sub());
        System.out.println("7 - 8 = " + context.execStrategy(7, 8));

        context = new Context(new Multi());
        System.out.println("7 * 8 = " + context.execStrategy(7, 8));
    }
}
